typedef int bool;

#define BLOCK_SIZE 4    // 可由用户定义的块大小
#define BLS_BLANK '#'   // 用于空白处的补齐字符

typedef struct _block {
    char ch[BLOCK_SIZE];    //块的数据域
    struct _block *next;    //块的指针域
} Block;

typedef struct {
    Block *head;        // 串的头指针
    Block *tail;        // 串的尾指针
    int len;            // 串的当前长度
} BLString;

//字符串初始化函数：
void blstr_init(BLString *T) {
    T->len = 0;
    T->head = NULL;
    T->tail = NULL;
}

void blk_print(BLString str) {
    Block *s = str.head; putchar('|');
    while(s) {
        printf("%s|", s -> ch);
        s = s -> next;
    }
}

#include<string.h>

BLString blk_new(char *str) {
    BLString res;
    res.len = strlen(str);
    res.head = malloc(sizeof(Block));
    Block *cur = res.head;
    for(int i=0;i<res.len;i++) {
        cur -> ch[i % 4] = str[i];
        if(i % 4 == 3) {
            cur -> next = malloc(sizeof(Block));
            cur = cur -> next;
        }
    }
    for(int i=res.len % 4;i<BLOCK_SIZE;i++) cur -> ch[i] = '#';
    res.tail = cur;
    return res;
}